package top.kaoshanji.p3ch12a;

/**
 * 代码清单-p3ch12a-380页a：Comparable接口的实现类
 * author kaoshanji
 * ^_^
 * create time 2025/2/6 9:10
 */
public class Sequence implements Comparable<Sequence> {

    private final int sequenceNumber;

    public Sequence(int sequenceNumber) {
        this.sequenceNumber = sequenceNumber;
    }

    @Override
    public int compareTo(Sequence o) {
        return Integer.compare(sequenceNumber, o.sequenceNumber);
    }
}
